<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>027-Promise的catch方法.html</title>
</head>
<body>
	
</body>
<script type="text/javascript">
	const promise = new Promise((resolve,reject)=>{
		setTimeout(()=>{
			reject('error')
		},0)
	})

	
	promise
	.then(data=>{
		console.log('success data:',data)
	})
	.catch(err=>{
		console.log('error data:',err)
	})
	.finally(()=>{
		console.log('finally...')
	})
</script>
</html>